package com.zxw.auth.feign;

import com.zxw.common.api.ApiResult;
import com.zxw.common.constant.ApiConst;
import com.zxw.common.entity.user.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * feign客户端
 */
@Component
@FeignClient(name = "zxw-user-server", path = ApiConst.API_PREFIX + "/user")
public interface UserOpenfeignApiService {

    /**
     * 根据用户名称查询
     *
     * @param username 用户名
     * @return
     */
    @GetMapping("/queryByUsername")
    ApiResult<UserVO> queryByUsername(@RequestParam("username") String username);

}
